var express = require('express')
var app = express()
var ejs = require('ejs')
var port = process.env.PORT || 3333

global.PATH = __dirname
global.HOST = 'http://localhost:'+port+'/'

app.use('/static',express.static('public'))

require(PATH+'/routes.js')(app)

ejs.delimiter = "?"

app.set('views',PATH+'/views')
app.engine('ejs',ejs.renderFile)
app.engine('.html',ejs.__express)
app.set('view engine','html')

app.listen(port, function(){
	console.log("server run in port:"+port);
})










